<p>An issue is raised when a string literal contains escaped backslashes (<code>\\</code>) that could be simplified using <code>String.raw</code>
template literals.</p>
<h2>Why is this an issue?</h2>
<p>String literals with escaped backslashes can be difficult to read and maintain. Each backslash character must be escaped with another backslash,
creating sequences like <code>\\</code> that are hard to interpret at a glance.</p>
<p>This problem is particularly common when working with:</p>
<ul>
  <li> File paths on Windows systems </li>
  <li> Regular expression patterns </li>
  <li> LaTeX or other markup that uses backslashes </li>
  <li> Any string content that naturally contains backslash characters </li>
</ul>
<p>The <code>String.raw</code> template literal provides a cleaner alternative. It treats backslashes literally without requiring escaping, making the
code more readable and less error-prone. The intent becomes clearer, and there’s less chance of accidentally missing or adding extra backslashes
during maintenance.</p>
<h3>What is the potential impact?</h3>
<p>Using escaped backslashes instead of <code>String.raw</code> reduces code readability and increases the likelihood of errors when maintaining
string literals. While this doesn’t cause runtime issues, it makes the codebase harder to understand and modify correctly.</p>
<h3>How to fix?</h3>
<p>Replace string literals containing escaped backslashes with <code>String.raw</code> template literals. The backslashes inside the template literal
don’t need to be escaped.</p>
<h4>Non-compliant code example</h4>
<pre data-diff-id="1" data-diff-type="noncompliant">
const filePath = "C:\\Users\\Documents\\file.txt"; // Noncompliant
</pre>
<h4>Compliant code example</h4>
<pre data-diff-id="1" data-diff-type="compliant">
const filePath = String.raw`C:\Users\Documents\file.txt`;
</pre>
<h3>Documentation</h3>
<ul>
  <li> <a href="https://github.com/sindresorhus/eslint-plugin-unicorn#readme">eslint-plugin-unicorn</a> - Rule <a
  href="https://github.com/sindresorhus/eslint-plugin-unicorn/blob/HEAD/docs/rules/prefer-string-raw.md">prefer-string-raw</a> </li>
  <li> String.raw - MDN Web Docs - <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/raw">Official
  documentation for the String.raw template literal tag</a> </li>
  <li> Template literals - MDN Web Docs - <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals">Comprehensive
  guide to template literals in JavaScript</a> </li>
</ul>
